---
title: Providers
description: Learn how to add providers into Latitude to use it in your prompts.
---

## Overview

Providers in Latitude are the foundation for connecting to various AI models and services.

The name you introduce for each provider will be the one you will have to use in your prompts.

## Creating a New Provider

You can add more than one provider. To create a new provider:

1. Go to the [Settings](https://app.latitude.so/settings) section
2. On the "Providers" section click on the "Create Provider" button
3. Fill out the configuration:
   1. **Provider**: An alias for this provider configuration. This will be the name you will use in the prompt editor.
   2. **Source**: The AI provider (e.g., OpenAI, Anthropic, Groq) or 'Custom' (instances like Ollama or Gpustack, compatible with the OpenAI API format).
   3. **API Key**: Your API key or access token for the selected provider.
   4. **URL**: Only for 'Custom'. The base URL to the OpenAI compatible API (the part before /chat/completions).
   5. **Default Model**: Optional. The model selected by default when using this provider in the prompt or evaluation. You can choose another one at any time in the editor.
4. Click "Create Provider" to save your new provider
5. Now you can use it in your prompts

<Note>
  For Google Vertex you have more details on how to do the setup in the [Google
  Vertex](/guides/getting-started/providers/vertex) guide. The{' '}
  <strong>API Key</strong> field is not required for Google Vertex. Instead, you
  will need to set up a service account.
</Note>

<Note>
  You can use the classic OpenAI [Chat Completions](https://platform.openai.com/docs/api-reference/chat) or [Responses](https://platform.openai.com/docs/api-reference/responses) endpoints. When creating a new [OpenAI provider](/guides/getting-started/providers/openai), you can choose between these two options. The default option is Chat Completions.
</Note>

## Setting a Default Provider

You can set a provider to be selected by default in new prompts or evaluations. You can choose another provider anytime in the editor.

To set a default provider:

1. Go to the "Settings" section
2. On the "Providers" section, on the desired provider, click on the "three dots" to open its action menu
3. Select "Set as default"

You can unset the default provider by clicking on the its action menu and selecting "Unset as default".

<Warning>
You have the ability to customize different providers for the following services: Prompts, Evaluations, and Experiments.
</Warning>

## Using Providers in Prompts

Once you've set up a provider, you can use it in your prompts:

1. Open the Prompt editor
2. Create a new prompt or edit an existing one
3. In the prompt configuration, select your desired provider from the dropdown menu or in the code

```
---
provider: openai
model: gpt-4o
---
```

For more information on integrating providers with your prompts and chains, see the [Prompt Editor](/guides/prompt-manager/overview) guide.
